package com.ytjj.qmyx.admin.eunm;

/**
 *
 *
 * @Version: 1.0
 */
public enum PromotersEnums {

	YTJJ("ytjj", "一探究竟"),
	XFH("xfh", "幸福汇"),;

	private String code;

	private String name;

	PromotersEnums(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	/**
	 * 根据枚举code获取名称
	 * @param code
	 * @return
	 */
	public static String getName(String code){
		PromotersEnums[] list = PromotersEnums.values();
		for (PromotersEnums item : list) {
			if (item.getCode().equals(code)) {
				return item.getName();
			}
		}
		return null;
	}
}
